Action: GPIO

The GPIO action controls the state of a GPIO pin based on it’s activation state.

The pin must be configured to the GPIO feature and OUTPUT behavior using the GPIO Configuration (0x0C,0x41) command.

 

Normal mode

Mode is ACTIVE_HIGH or ACTIVE_LOW

In normal mode, the pin state is set during every event cycle. When mode is ACTIVE_HIGH, the pin directly reflects the state of the trigger; it is high when the trigger is active and low otherwise. When mode is ACTIVE_LOW, the pin reflects the opposite state.

Example: Square wave output

 

Oneshot mode

Mode is ONESHOT_HIGH or ONESHOT_LOW

In oneshot mode, the state of the pin is changed once and only in one direction. For ONESHOT_HIGH, the pin is set high when the trigger activates, and for ONESHOT_LOW, the pin is set low. No change is applied when the trigger deactivates. The change will be applied again the next time the trigger activates (the trigger must first deactivate).

This is useful when the pin should be manually reset using the GPIO State (0x0C,0x42) command. Alternatively, the pin can be reset via a separate action which is configured for the opposite oneshot mode.

Example: Emergency stop

 

Toggle mode

Mode is TOGGLE

Toggle mode changes the state of the pin every time the trigger re-activates.

 

Examples